x86/PV: drop a few misleading paging_mode_refcounts() checks
authorJan Beulich <jbeulich@suse.com>
Fri, 31 Jul 2020 15:40:13 +0000 (17:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 31 Jul 2020 15:40:13 +0000 (17:40 +0200)
commitcb79dc100fae7295009118ae10efe7822d5be2af
treefd4172d1c7b990b374d1e92c88a5ca8c08d28328
parenta85f67b2658ed8032586b3a3e7cd78814d20aa4b
x86/PV: drop a few misleading paging_mode_refcounts() checks

The filling and cleaning up of v->arch.guest_table in new_guest_cr3()
was apparently inconsistent so far: There was a type ref acquired
unconditionally for the new top level page table, but the dropping of
the old type ref was conditional upon !paging_mode_refcounts(). Mirror
this also to arch_set_info_guest().

Also move new_guest_cr3()'s #ifdef to around the function - both callers
now get built only when CONFIG_PV, i.e. no need to retain a stub.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/mm.c